﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Petroleum.DB;
using Petroleum.DB.Model;
using HZH_Controls;
using Petroleum.Model;

namespace Petroleum.UC.Public
{
    public partial class Step2_Lith : UserControl, HZH_Controls.Controls.IDataGridViewCustomCell
    {
        private Pressure m_object = null;

        public Step2_Lith()
        {
            InitializeComponent();
            //this.attribute = attribute;
            // txtInput.InputType = TextInputType.Number;
            txtInput.TextChanged += txt_TextChanged;
        }
        public void SetBindSource(object obj)
        {
            if (obj is Pressure)
                m_object = (Pressure)obj;
        }
        private void txt_TextChanged(object sender, EventArgs e)
        {
            if (m_object != null)
            {
                string value = txtInput.InputText;
                Text = value;

                m_object.Lithology = value;

            }
        }
    }
}
